#pragma once
#include "Graphic.h"

namespace Core
{
	struct Rect;
}
using Core::Rect;

namespace Graphics
{
	class Renderable2D;

	class Viewport :public Renderable
	{
		friend Renderable2D;

	private:
		 RenderHash m_RenderHash;
		 Rect* m_pRect;

	protected:
		// Render every Renderable obj in the renderlist
		virtual bool RenderImpl(void);

		// Add a Renderable ptr to the renderlist
		virtual void Add(Renderable* const obj);

		// Remove a Renderable ptr from the renderlist
		virtual void Remove(Renderable* const obj);

	public:
		Viewport(void);
		Viewport(Rect* pRect);
		~Viewport(void);

		void SetRect(const Rect& rect);
		const Rect& GetRect(void);
	};
}
